/*
 * @Descripttion: 
 * @Author: liuYaoYu
 * @Date: 2021-12-20 11:34:36
 * @LastEditors: liuYaoYu
 * @LastEditTime: 2021-12-20 11:34:37
 */
package main
import (
	"fmt"
)
func main(){
	var maps map[string]string=make(map[string]string,3)
	// 增
	maps["age"]="18"
	fmt.Println(maps)
	// 改
	maps["age"]="20"
	maps["name"]="刘曜宇"
	fmt.Println(maps)
	// 删除
	delete(maps,"name")
	delete(maps,"name")
	delete(maps,"name")
	delete(maps,"name")
	fmt.Println(maps)

	// 查
	val,ok :=maps["name"]
	if ok {
		fmt.Println("有age 职位",val)
	}else{
		fmt.Println("没有age 没有这个值")
	}
}